package com.tencent.iov.cowin.befsale.clue.dao.http.qwSystem;

import com.tencent.iov.cowin.befsale.clue.dao.http.qwSystem.request.UserBehaviorDateRequest;
import com.tencent.iov.cowin.befsale.clue.dao.http.qwSystem.request.WxCpUserListRequest;
import com.tencent.iov.cowin.befsale.clue.dao.http.qwSystem.response.UserBehaviorResponse;
import com.tencent.iov.cowin.befsale.clue.dao.http.qwSystem.response.UserDetailInfo;
import com.tencent.iov.cowin.befsale.clue.dao.http.qwSystem.response.WxAgenDetailResponse;
import com.tencent.iov.cowin.befsale.clue.value.contants.ServiceConstant;
import com.tencent.iov.cowin.befsale.clue.value.enums.AgentTypeEnum;
import com.software.boot.common.entity.Response;
import com.software.boot.weixin.cp.bean.WxCpAgent;
import com.software.boot.weixin.cp.bean.WxCpTagGetResult;
import com.software.boot.weixin.cp.bean.WxCpUser;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author: zly
 * @description:
 * @createDate: 2022-01-14
 **/

@FeignClient(name = ServiceConstant.SCRM_QWSYSTEM_SERVICE,
        url = ServiceConstant.SCRM_QWSYSTEM_HOST)
public interface QwSystmeClient {
     String SYSTEM_BEHAVIOR_URL_PREFIX = "/v1/api/wx/user/behavior/";

    @PostMapping(SYSTEM_BEHAVIOR_URL_PREFIX+"get_user_behavior_data")
    @ApiOperation(value = "获取「联系客户统计」数据", httpMethod = "POST", response = Response.class, notes = "get_user_behavior_data")
    Response<UserBehaviorResponse> getUserBehaviorData(@RequestBody UserBehaviorDateRequest request, @RequestHeader(value ="tenantId" ) String tenantId, @RequestHeader(value ="corpId" ) String corpId);

    @GetMapping("/v1/api/wx/cp/qwUser/getAgentDetail")
    @ApiOperation(value = "获取应用详情", httpMethod = "GET", response = Response.class, notes = "getAgentDetail")
    Response<UserDetailInfo> applicationDetail(@RequestParam("agentType") AgentTypeEnum agentTypeEnum) ;

    @GetMapping("/v1/api/wx/cp/qwUser/getAgent")
    @ApiOperation(value = "获取应用详情", httpMethod = "GET", response = Response.class, notes = "getAgentDetail")
    Response<WxAgenDetailResponse> agentDetail(@RequestParam("agentType") AgentTypeEnum agentTypeEnum);

    @GetMapping(value = "/v1/api/wx/cp/tag/getTag")
    @ApiOperation(value = "标签管理-获取标签",httpMethod = "GET", response = Response.class, notes = "getTag")
    Response<WxCpTagGetResult> getTag(@RequestParam(value = "tagId") Integer tagId) ;

    @PostMapping("/v1/api/wx/cp/qwUser/list")
    @ApiOperation(value = "成员管理-获取成员", httpMethod = "POST", response = Response.class, notes = "AgentList")
    Response<List<WxCpUser>> userList(@RequestBody WxCpUserListRequest request);
}
